function getTempStr(val,data){
  if(val) {
    const list = val.match(/(\{)([A-Za-z|_|\d])+(\})/g)
    if(list && list.length > 0){
      let newVal = val
      console.log(list)
      list.forEach(key => {
        let newKey = key.substring(1,key.length-1)
        if(data[newKey]!==undefined){
          newVal = newVal.replace(new RegExp(key,'g'),data[newKey])
        }
      })
      return newVal
    } else {
      return val
    }
  } else {
    return val
  }
}
export {
  getTempStr
}
